import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		hasLogin: false,//登录页面
		userInfo: {},//个人信息
		myaddress:{},//默认地址
		companyphone:''
	},
	mutations: {
		login(state, provider) {
			state.hasLogin = true;
			state.userInfo = provider;
		},
		logout(state) {
			state.hasLogin = false;
			state.userInfo = {};
		},
		users(state, list) {
			state.userInfo = list;
		},
		myaddress(state,list){
			state.address= list
		},
		companyphone(state,list){
			state.companyphone = list
		}
	},
	actions: {
	
	}
})

export default store
